package com.example.serviceprovider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/***
 * @author wangpeng
 * @since 2021-06-04  19:52
 */
@RestController
@RefreshScope
public class ProviderController {

    @Value("${phone}")
    private String phone;

    @GetMapping("/phone")
    public Mono<String> getPhone(){
        return Mono.just(phone);
    }

    @GetMapping("/hello")
    public Mono<String> hello(){
        return Mono.just("Hello");
    }
}
